/***********************************************************************
 * Copyright CSAir.
 * All rights reserved. 
 *
 * HISTORY
 ***********************************************************************
 *  ID      DATE                PERSON            REASON
 *  1      2009-10-09           曾睿                                      create
 ************************************************************************
 * 
 */
package com.redhat.redwork.exception;


/**
 * 异常基础抽象类
 * 
 * @author 曾睿
 * @see
 */
public abstract class BaseException extends Exception {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2244214525024058547L;
	
	/**错误代码key**/
	private String key;
	
	/**
	 * 获取错误代码key值
	 * @return
	 */
	public String getKey() {
		return key;
	}


	/**错误信息**/
	private String[] params;
	
	private Exception originException;


     /**
      * 获取错误信息
      * @return
      */
     public String[] getParams() {
		return params;
	}

    public BaseException() {}
	/**
      * 构造函数
      * @param key
      */
	public BaseException(String key) {
		super(key);
		this.key = key;
	}

	
	/**
	 * 构造函数
	 * @param key
	 * @param messages
	 */
	public BaseException(String key,String[] params) {
		super(key);
		this.key = key;
		this.params = params;
	}

	public Exception getOriginException() {
		return originException;
	}

	public void setOriginException(Exception originException) {
		this.originException = originException;
	}

	
}
